Skip to content

Conversation

MaxDesiatov
Copy link
Contributor

WASILibc wasn't built for the embedded stdlib in stdlib/public/Platform/CMakeLists.txt. New copy_wasilibc_modulemap_embedded_resource and embedded-stdlib-platform-${triple} targets are added, the latter for wasm32-unknown-wasip1 only for now. Also added a wasilibc_functions.swift test to verify the result.

Resolves #83513

rdar://157467412

WASILibc wasn't built for the embedded stdlib in `stdlib/public/Platform/CMakeLists.txt`. New `copy_wasilibc_modulemap_embedded_resource` and `embedded-stdlib-platform-${triple}` targets are added, the latter for `wasm32-unknown-wasip1` only for now. Also added a `wasilibc_functions.swift` test to verify the result.

Resolves swiftlang#83513

rdar://157467412
@MaxDesiatov MaxDesiatov requested a review from a team as a code owner August 18, 2025 17:42
@MaxDesiatov MaxDesiatov added test suite Area: test suite standard library Area: Standard library umbrella platform support embedded Embedded Swift WebAssembly Platform: WebAssembly WASI WebAssembly System Interface support labels Aug 18, 2025
@MaxDesiatov
Copy link
Contributor Author

@swift-ci smoke test

@MaxDesiatov MaxDesiatov moved this to In Progress in Swift for Wasm Aug 18, 2025
@MaxDesiatov MaxDesiatov requested a review from bnbarham August 18, 2025 18:42
@MaxDesiatov
Copy link
Contributor Author

@swift-ci smoke test

@MaxDesiatov
Copy link
Contributor Author

@swift-ci smoke test

This fixes wasi-libc.modulemap not found after installation
@MaxDesiatov
Copy link
Contributor Author

swiftlang/swift-sdk-generator#237
@swift-ci smoke test

@MaxDesiatov
Copy link
Contributor Author

swiftlang/swift-sdk-generator#237
@swift-ci build toolchain

@MaxDesiatov
Copy link
Contributor Author

@swift-ci smoke test

@MaxDesiatov MaxDesiatov enabled auto-merge August 19, 2025 13:03
@MaxDesiatov MaxDesiatov merged commit 450cb14 into swiftlang:main Aug 19, 2025
5 of 6 checks passed
@MaxDesiatov MaxDesiatov deleted the embedded-wasilibc branch August 19, 2025 18:01
@github-project-automation github-project-automation bot moved this from In Progress to Done in Swift for Wasm Aug 19, 2025
@MaxDesiatov MaxDesiatov restored the embedded-wasilibc branch August 21, 2025 14:32
@MaxDesiatov MaxDesiatov deleted the embedded-wasilibc branch August 21, 2025 14:41
MaxDesiatov added a commit that referenced this pull request Aug 22, 2025
**Explanation**: Cherry-pick of #83792, merged as 450cb14
WASILibc wasn't built for the embedded stdlib in `stdlib/public/Platform/CMakeLists.txt`. New `copy_wasilibc_modulemap_embedded_resource` and `embedded-stdlib-platform-${triple}` targets are added, the latter for `wasm32-unknown-wasip1` only for now. Also added a `wasilibc_functions.swift` test to verify the result.
**Scope**: limited to Embedded Swift for Wasm;
**Risk**: low due to limited scope;
**Testing**: added new lit test to the existing Embedded Swift test suite;
**Issue**: rdar://157467412
**Reviewer**: @bnbarham
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
embedded Embedded Swift platform support standard library Area: Standard library umbrella test suite Area: test suite WASI WebAssembly System Interface support WebAssembly Platform: WebAssembly
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

import WASILibc is unavailable in Embedded Swift for WASI
1 participant